
// 继承： 不劳而获

interface IPoint2D { x: number; y: number, a:string }
// interface IPoint3D { x: number; y: number; z: number }

interface IPoint3D extends IPoint2D {
    z: number
} 

const p1: IPoint2D = {x:1, y:2,a: "1"}
const p2: IPoint3D = {a:'2',x:1, y:2, z: 3}